db = require '../base/db'

Schema = db.Schema
mongoose = db.mongoose
updated_at = db.mongoose_plugins.updated_at

otcTzqxRateSchema = new Schema({

  # 投资期限
  tzqx : String

  # 基准利率
  rate : Number

  # 期限与得分对照表bp（单位万分之一）
  number_tzqx : Object

  extra2 : Schema.Types.Mixed

})

otcTzqxRateSchema.set('autoIndex', false)

otcTzqxRateSchema.index {_id:1},{unique:true}

otcTzqxRateSchema.index {tzqx:1},{unique:true}

otcTzqxRateSchema.plugin(updated_at,{index:true})
module.exports = mongoose.model 'otc_tzqx_rate', otcTzqxRateSchema